<template>
	<view class="big">
		<uni-grid :column="4" :show-border="false">
			<uni-grid-item v-for="(item, index) in list" :key="index" >
				<view class="grid-item-box"
					style="background-color: #fff;display: flex;flex-direction: column;justify-content: center;align-items: center;"
					@click="details(item)">
					<image :src="item.img1" style="width: 100rpx;height: 100rpx;"></image>
					<text class="text" style="height: 50rpx;">{{item.brand}}</text>
					<span style="margin-left: 5px;">￥{{ item.originprice }}</span>
				</view>
			</uni-grid-item>
		</uni-grid>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		methods: {
			details(item){
					uni.navigateTo({
						url: `/pages/details/details?kinddeatilslist=${encodeURIComponent(JSON.stringify(item))}`
					});
			}
		},
		onLoad(query) {
			if (query.list) {
				this.list = JSON.parse(decodeURIComponent(query.list));
			}
		}

	}
</script>

<style lang="scss">
	.big {
		width: 100vw;
		height: 100vh;
	}
</style>